﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administration/main.master" AutoEventWireup="true" CodeBehind="Maintenance_AddMaintenanceNote.aspx.cs" Inherits="CS424_9pts.Administration.Maintenance_AddMaintenanceNote" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="server">
<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" AutoGenerateRows="False"
        DataKeyNames="MaintenanceID" DataSourceID="SqlDataSource1">
        <Fields>
            <asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" />
            <asp:CommandField ShowEditButton="True" />
        </Fields>
    </asp:DetailsView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CarManagementConnectionString %>"
        DeleteCommand="DELETE FROM [Maintenance] WHERE [MaintenanceID] = @MaintenanceID" InsertCommand="INSERT INTO [Maintenance] ([Note]) VALUES (@Note)"
        SelectCommand="SELECT [Note], [MaintenanceID] FROM [Maintenance] WHERE ([MaintenanceID] = @MaintenanceID)"
        UpdateCommand="UPDATE [Maintenance] SET [Note] = @Note WHERE [MaintenanceID] = @MaintenanceID">
        <DeleteParameters>
            <asp:Parameter Name="MaintenanceID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Note" Type="String" />
        </InsertParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="MaintenanceID" QueryStringField="id" Type="Int32" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="Note" Type="String" />
            <asp:Parameter Name="MaintenanceID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>
